WPS Office.apk(点击下载) / jxc.java


package defpackage;

import android.app.Activity;
import android.app.LoaderManager;
import android.content.Loader;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import cn.wps.moffice_eng.R;
import defpackage.jwg;

/* renamed from: jxc  reason: default package */
public final class jxc extends jwh implements LoaderManager.LoaderCallbacks<jwv>, jwg.a {
    public View cBn;
    private Rect dSu = new Rect();
    private Rect hmL = new Rect();
    private jxa lHj;
    private jxf lHk;
    public jxe lHl;
    jxd lHm;
    public jxe lHn;

    public jxc(Activity activity) {
        super(activity);
    }

    private boolean aI(View view) {
        view.getGlobalVisibleRect(this.hmL);
        return this.dSu.contains(this.hmL);
    }

    @Override // defpackage.jwg.a
    public final jxa cZi() {
        return this.lHj;
    }

    @Override // defpackage.jwg.a
    public final jwh cZj() {
        return this.lHl;
    }

    @Override // defpackage.jwg.a
    public final jxf cZk() {
        return this.lHk;
    }

    @Override // defpackage.jwg.a
    public final jxd cZl() {
        return this.lHm;
    }

    @Override // defpackage.jwg.a
    public final jwh cZm() {
        return this;
    }

    @Override // defpackage.jwg.a
    public final jwh cZn() {
        return this.lHn;
    }

    @Override // defpackage.jwh
    public final void destroy() {
        super.destroy();
        this.lHj.destroy();
        this.lHk.destroy();
        this.lHm.destroy();
        this.lHl.destroy();
        this.lHn.destroy();
    }

    @Override // defpackage.jwh
    public final void initView() {
        LayoutInflater.from(this.mActivity).inflate(R.layout.template_beauty_main_header, this.lGl);
        LinearLayout linearLayout = (LinearLayout) this.lGl.findViewById(R.id.content_layout);
        this.lHj = new jxa(this.mActivity);
        linearLayout.addView(this.lHj.getView());
        this.lHk = new jxf(this.mActivity);
        linearLayout.addView(this.lHk.getView());
        this.lHl = new jxe(this.mActivity);
        linearLayout.addView(this.lHl.getView());
        this.lHm = new jxd(this.mActivity);
        linearLayout.addView(this.lHm.getView());
        this.lHn = new jxe(this.mActivity);
        linearLayout.addView(this.lHn.getView());
        LayoutInflater.from(this.mActivity).inflate(R.layout.template_beauty_section_divider_layout, linearLayout);
        View inflate = LayoutInflater.from(this.mActivity).inflate(R.layout.template_section_load_more_title_layout, (ViewGroup) linearLayout, false);
        linearLayout.addView(inflate);
        ((TextView) inflate.findViewById(R.id.docer_recommend_component_title)).setText(R.string.template_section_like);
        HK(2);
        a((LoaderManager.LoaderCallbacks) this);
        this.mActivity.getLoaderManager().restartLoader(1, null, new LoaderManager.LoaderCallbacks<jww>() {
            /* class defpackage.jxc.AnonymousClass1 */

            @Override // android.app.LoaderManager.LoaderCallbacks
            public final Loader<jww> onCreateLoader(int i, Bundle bundle) {
                jws jws = new jws();
                jws.lGK = jwk.dx(jwj.cZo().cZp());
                jwj.cZo();
                jws.title = jwj.getTitle();
                jws.lGL = cqy.asP();
                jwp cZs = jwp.cZs();
                jwo jwo = new jwo(jxc.this.mActivity.getApplicationContext());
                jwo.mRequestUrl = "https://easy.wps.cn/wppv3/fetch/libhomerec";
                jwo.laA = 1;
                jwo.lGF = cZs.mGson.toJson(jws);
                jwo.laC = 
                /*  JADX ERROR: Method code generation error
                    jadx.core.utils.exceptions.CodegenException: Error generate insn: 0x004d: IPUT  
                      (wrap: java.lang.reflect.Type : 0x0049: INVOKE  (r0v3 java.lang.reflect.Type) = (wrap: jwp$3 : 0x0046: CONSTRUCTOR  (r0v2 jwp$3) = (r1v5 'cZs' jwp) call: jwp.3.<init>(jwp):void type: CONSTRUCTOR) type: VIRTUAL call: jwp.3.getType():java.lang.reflect.Type)
                      (r3v0 'jwo' jwo)
                     jwo.laC java.lang.reflect.Type in method: jxc.1.onCreateLoader(int, android.os.Bundle):android.content.Loader<jww>, file: classes6.dex
                    	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:255)
                    	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:217)
                    	at jadx.core.codegen.RegionGen.makeSimpleBlock(RegionGen.java:110)
                    	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:56)
                    	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:93)
                    	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:59)
                    	at jadx.core.codegen.MethodGen.addRegionInsns(MethodGen.java:244)
                    	at jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:237)
                    	at jadx.core.codegen.ClassGen.addMethodCode(ClassGen.java:342)
                    	at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:295)
                    	at jadx.core.codegen.ClassGen.lambda$addInnerClsAndMethods$2(ClassGen.java:264)
                    	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
                    	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
                    	at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
                    	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
                    Caused by: jadx.core.utils.exceptions.CodegenException: Error generate insn: 0x0049: INVOKE  (r0v3 java.lang.reflect.Type) = (wrap: jwp$3 : 0x0046: CONSTRUCTOR  (r0v2 jwp$3) = (r1v5 'cZs' jwp) call: jwp.3.<init>(jwp):void type: CONSTRUCTOR) type: VIRTUAL call: jwp.3.getType():java.lang.reflect.Type in method: jxc.1.onCreateLoader(int, android.os.Bundle):android.content.Loader<jww>, file: classes6.dex
                    	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:255)
                    	at jadx.core.codegen.InsnGen.addWrappedArg(InsnGen.java:119)
                    	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:103)
                    	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:428)
                    	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:249)
                    	... 14 more
                    Caused by: jadx.core.utils.exceptions.CodegenException: Error generate insn: 0x0046: CONSTRUCTOR  (r0v2 jwp$3) = (r1v5 'cZs' jwp) call: jwp.3.<init>(jwp):void type: CONSTRUCTOR in method: jxc.1.onCreateLoader(int, android.os.Bundle):android.content.Loader<jww>, file: classes6.dex
                    	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:255)
                    	at jadx.core.codegen.InsnGen.addWrappedArg(InsnGen.java:119)
                    	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:103)
                    	at jadx.core.codegen.InsnGen.addArgDot(InsnGen.java:87)
                    	at jadx.core.codegen.InsnGen.makeInvoke(InsnGen.java:715)
                    	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:367)
                    	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:230)
                    	... 18 more
                    Caused by: jadx.core.utils.exceptions.JadxRuntimeException: Expected class to be processed at this point, class: jwp, state: GENERATED_AND_UNLOADED
                    	at jadx.core.dex.nodes.ClassNode.ensureProcessed(ClassNode.java:215)
                    	at jadx.core.codegen.InsnGen.makeConstructor(InsnGen.java:630)
                    	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:363)
                    	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:230)
                    	... 24 more
                    */
                /*
                    this = this;
                    jws r0 = new jws
                    r0.<init>()
                    jwj r1 = defpackage.jwj.cZo()
                    float r1 = r1.cZp()
                    java.lang.String r1 = defpackage.jwk.dx(r1)
                    r0.lGK = r1
                    defpackage.jwj.cZo()
                    java.lang.String r1 = defpackage.jwj.getTitle()
                    r0.title = r1
                    java.lang.String r1 = defpackage.cqy.asP()
                    r0.lGL = r1
                    jwp r1 = defpackage.jwp.cZs()
                    jxc r2 = defpackage.jxc.this
                    android.app.Activity r2 = defpackage.jxc.a(r2)
                    jwo r3 = new jwo
                    android.content.Context r2 = r2.getApplicationContext()
                    r3.<init>(r2)
                    java.lang.String r2 = "https://easy.wps.cn/wppv3/fetch/libhomerec"
                    r3.mRequestUrl = r2
                    r2 = 1
                    r3.laA = r2
                    com.google.gson.Gson r2 = r1.mGson
                    java.lang.String r0 = r2.toJson(r0)
                    r3.lGF = r0
                    jwp$3 r0 = new jwp$3
                    r0.<init>()
                    java.lang.reflect.Type r0 = r0.getType()
                    r3.laC = r0
                    return r3
                */
                throw new UnsupportedOperationException("Method not decompiled: defpackage.jxc.AnonymousClass1.onCreateLoader(int, android.os.Bundle):android.content.Loader");
            }

            /* JADX DEBUG: Method arguments types fixed to match base method, original types: [android.content.Loader, java.lang.Object] */
            @Override // android.app.LoaderManager.LoaderCallbacks
            public final /* synthetic */ void onLoadFinished(Loader<jww> loader, jww jww) {
                jww jww2 = jww;
                if (jww2 != null) {
                    try {
                        if (!(jww2.lGO == null || jww2.lGO.lGR == null || jww2.lGO.lGR.lGT == null)) {
                            jxc.this.lHl.getView().setVisibility(0);
                            jxc.this.lHl.a(jww2.lGO.lGR);
                            if (jww2 != null || jww2.lGO == null || jww2.lGO.lGP == null) {
                                jxc.this.lHm.getView().setVisibility(8);
                            } else {
                                jxc.this.lHm.getView().setVisibility(0);
                                jxc.this.lHm.a(jww2.lGO);
                            }
                            if (jww2 != null || jww2.lGO == null || jww2.lGO.lGS == null || jww2.lGO.lGS.lGT == null) {
                                jxc.this.lHn.getView().setVisibility(8);
                            }
                            jxc.this.lHn.getView().setVisibility(0);
                            jxc.this.lHn.a(jww2.lGO.lGS);
                            return;
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                        return;
                    }
                }
                jxc.this.lHl.getView().setVisibility(8);
                if (jww2 != null) {
                }
                jxc.this.lHm.getView().setVisibility(8);
                if (jww2 != null) {
                }
                jxc.this.lHn.getView().setVisibility(8);
            }

            @Override // android.app.LoaderManager.LoaderCallbacks
            public final void onLoaderReset(Loader<jww> loader) {
            }
        });
    }

    @Override // cn.wps.moffice.presentation.control.template.beauty.widget.TemplateView.a
    public final void onConfigurationChanged(Configuration configuration) {
        this.cBn.getGlobalVisibleRect(this.dSu);
        this.lHl.onConfigurationChanged(configuration);
        this.lHk.cZw();
        if (!aI(this.lHj.getView())) {
            this.lHj.onConfigurationChanged(configuration);
        }
        if (!aI(this.lHn.getView())) {
            this.lHn.onConfigurationChanged(configuration);
        }
    }

    @Override // android.app.LoaderManager.LoaderCallbacks
    public final Loader<jwv> onCreateLoader(int i, Bundle bundle) {
        jws jws = new jws();
        jwj.cZo();
        jws.title = jwj.getTitle();
        jws.lGL = cqy.asP();
        return jwp.cZs().a(this.mActivity, jws);
    }

    /* JADX DEBUG: Method arguments types fixed to match base method, original types: [android.content.Loader, java.lang.Object] */
    @Override // android.app.LoaderManager.LoaderCallbacks
    public final /* synthetic */ void onLoadFinished(Loader<jwv> loader, jwv jwv) {
        jwv jwv2 = jwv;
        if (jwv2 != null) {
            try {
                if (jwv2.ftg != null && jwv2.ftg.size() > 0) {
                    this.lHj.getView().setVisibility(0);
                    this.lHj.v(jwv2.ftg.get(0).lGN);
                    if (jwv2.ftg.size() > 1) {
                        this.lHk.getView().setVisibility(0);
                        this.lHk.v(jwv2.ftg.get(1).lGN);
                        return;
                    }
                    this.lHk.getView().setVisibility(8);
                    return;
                }
            } catch (Exception e) {
                e.printStackTrace();
                return;
            }
        }
        this.lHj.getView().setVisibility(8);
    }

    @Override // android.app.LoaderManager.LoaderCallbacks
    public final void onLoaderReset(Loader<jwv> loader) {
    }
}